Global BX,IM,X,WRD$(),WAD$(),BL$,Z,LFT,RHT,WRONG,RIGHT,ANS$,TL
'
GROOVY
GRAVY
'
'
Procedure GROOVY
X=192
If Ntsc Then X=136
Screen Open 0,320,X+64,16,Lowres
Curs Off : Flash Off : Cls 0
Get Sprite Palette
Volume 20
CAPTION
Randomize Timer
Make Icon Mask 1
Make Icon Mask 3
Paper 1
For N=1 To 10
Hot Spot N,$10
Next N
If WAD$(1)=""
Dir$="df0:"
For N=1 To 10
Read WAD$(N)
Next N
End If
Data "bus","ball","bricks","bear","car","kite","boot","rocket","book","balloon"
Hide
Double Buffer
Screen Hide
Cls 0
WALLS
BIN
Screen Show
BL$=" "
End Proc
Procedure GRAVY
Do
SPEED
WRONG=0 : RIGHT=0
Repeat
IM=Rnd(9)+1
WRITE
Timer=0
BX=Rnd(7)+1
BX=(BX*32)
While Timer<TL
Bob 1,BX,1,IM
CHECKY
Wait Vbl
Wend
Sam Play 15,1,8000
For N=1 To X+10
Bob 1,BX,N,IM
CHECKY
Wait Vbl
Next N
Bob Off
CHECKPO
Until WRONG=5 or RIGHT=20
DEAD
Loop
End Proc
Procedure CHECKY
K1=Key State(78)
K2=Key State(79)
If K1
If BX<300
Inc BX
End If
End If
If K2
If BX>10
Dec BX
End If
End If
End Proc
Procedure WALLS
For M=1 To 4
For N=1 To 5
Paste Icon(N*64)-63,(M*64)-63,2
Next N
Next M
End Proc
Procedure BIN
For N=1 To 5
M=(N*64)-63
Paste Icon M,X,1
Next N
End Proc
Procedure WORD
Restore
IM$=WAD$(IM)
Repeat
R=Rnd(9)+1
BX$=WAD$(R)
Until BX$<>IM$
WRD$(1)=BX$
For W=2 To 5
Repeat
R=Rnd(9)+1
BX$=WAD$(R)
Until(BX$<>WRD$(W-1)) and(BX$<>IM$)
WRD$(W)=BX$
Next W
Z=Rnd(4)+1
WRD$(Z)=IM$
CALCI
End Proc
Procedure WRITE
For N=1 To 5
M=(N*64)-63
Text M+4,X+8,BL$
Next N
WORD
For N=1 To 5
M=(N*64)-63
Text M+4,X+8,WRD$(N)
Sam Play 15,4,3000+(N*1000)
Next N
End Proc
Procedure CALCI
LFT=Z*64-63
RHT=LFT+64
End Proc
Procedure CHECKPO
If BX=>LFT and BX<=RHT
Sam Play 15,2,9000
Inc RIGHT
If TL>19
TL=TL-20
End If
Else
Inc WRONG
Sam Play 15,3,9000
Paste Icon(WRONG*64)-63,1,3
Wait 10
Sam Play 15,3,6000
If TL<200
TL=TL+20
End If
End If
End Proc
Procedure DEAD
Cls 1,20,10 To 290,45
A$=" Another go? "
B$=" "
C$=A$
Locate 0,2
If RIGHT<WRONG
Centre " Try a little harder next time. "
Else
V$=" Well done. You had"+Str$(RIGHT)+" correct. "
End If
Centre V$
Locate ,4
For N=1 To 32773 Extension_0_4000
If Extension_0_3006 Menu Base Extension_0_0602 Extension_0_6500 Extension_0_F8A2 Extension_0_0086 Extension_0_00C0 Intcall Extension_0_6110 Extension_0_02DE Illegal_Constant_001A��#